package com.feeyin.radar.commons;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public final class FinalUtils
{
  public static final long MAXUPLOADSIZE = 10000000L;
  public static final String BACKUPDIRECTORY = "backup";
  public static final String UPLOADDIRECTORY = "upload";
  public static final String UPLOADTEMPLATE = "template";
  public static final String UPLOADTEMP = "temp";
  public static final String UPLOADSALERECORD = "saleRecord";
  public static final String UPLOADCONTRACT = "contract";
  public static final int PAGESIZE = 18;
  public static final String LANGUAGE = "SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME";
  public static final int WARNINGAGINGDAY = 3;
  public static int ONLINEUSERNUM = 5;

  public static String ISFUNTIONMANAGE = "0";

  public static String TIMEREMIND = "";

  public static String AUDITREMIND = "";

  public static String SYSTEMREMIND = "";

  public static String LINK = "你好";

  public static String AUDITCONTRACT = "";

  public static String AUDITSALECOST = "";

  public static String ID = "";

  public static String DAY = "";

  public static String AGING = "";

  public static String BYMOVE = "";

  public static String EMPLOYEE = "";

  public static String BIRTHDAY = "";

  public static String AGINGCONTRACT = "";

  public static String MONTH = "";

  public static String DAYOFMONTH = "";

  public static String LEVEL1 = "";

  public static String LEVEL2 = "";

  public static String LEVEL3 = "";

  public static String LEVEL4 = "";

  public static String LEVEL5 = "";

  private static Properties properties = new Properties();

  static { InputStream inputStream = FinalUtils.class.getClassLoader().getResourceAsStream("config/dictionary.properties");
    try {
      properties.load(inputStream);
      TIMEREMIND = properties.getProperty("dictionary.timeRemind");
      AUDITREMIND = properties.getProperty("dictionary.auditRemind");
      SYSTEMREMIND = properties.getProperty("dictionary.systemRemind");
      LINK = properties.getProperty("dictionary.link");
      AUDITCONTRACT = properties.getProperty("dictionary.auditContract");
      AUDITSALECOST = properties.getProperty("dictionary.auditSaleCost");
      ID = properties.getProperty("dictionary.id");
      DAY = properties.getProperty("dictionary.day");
      AGING = properties.getProperty("dictionary.aging");
      BYMOVE = properties.getProperty("dictionary.byMove");
      EMPLOYEE = properties.getProperty("dictionary.employee");
      BIRTHDAY = properties.getProperty("dictionary.birthday");
      AGINGCONTRACT = properties.getProperty("dictionary.agingContract");
      MONTH = properties.getProperty("dictionary.month");
      DAYOFMONTH = properties.getProperty("dictionary.dayOfMonth");
      String onlineUserNum = properties.getProperty("dictionary.numManage");
      if ((!StringUtils.isEmpty(onlineUserNum)) && (Integer.parseInt(onlineUserNum) > 5))
      {
        ONLINEUSERNUM = Integer.parseInt(onlineUserNum);
      }
      String isFunctionManage = properties.getProperty("dictionary.functionManage");
      if (!StringUtils.isEmpty(isFunctionManage)) {
        ISFUNTIONMANAGE = isFunctionManage;
      }
      LEVEL1 = properties.getProperty("employee.level1");
      LEVEL2 = properties.getProperty("employee.level2");
      LEVEL3 = properties.getProperty("employee.level3");
      LEVEL4 = properties.getProperty("employee.level4");
      LEVEL5 = properties.getProperty("employee.level5");
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}